package com.speily.current.wait_notify.product_consumer;

/**
 * @Auther: SPL
 * @Date: 2019-07-30 16:07
 * @Description: -
 */
public class Consumer extends Thread {

    private Storager storager;

    public Consumer(Storager storager) {
        this.storager = storager;
    }

    //每次消费的数量
    private int num;

    @Override
    public void run() {
        consume(num);
    }

    private void consume(int num) {
        storager.consume(num);
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }
}
